# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-pyproject-metadata
pkgver=0.9.0
pkgrel=0
pkgdesc="PEP 621 metadata parsing"
url="https://github.com/FFY00/python-pyproject-metadata"
arch="noarch"
license="MIT"
depends="python3 py3-packaging"
makedepends="py3-gpep517 py3-flit-core py3-wheel"
checkdepends="py3-pytest"
source="$pkgname-$pkgver-3.tar.gz::https://github.com/FFY00/python-pyproject-metadata/archive/refs/tags/$pkgver.tar.gz"
subpackages="$pkgname-pyc"
builddir="$srcdir/pyproject-metadata-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
ef79e6549c9aeb644a188910ecaac56bf1cf7c4326f4bb1f1e07514eef0f56966e8eaabfe791f82f488810428a4840a7970a1ddf7a80056c630d5f91e85911a1  py3-pyproject-metadata-0.9.0-3.tar.gz
"
